//
//  GYOrderList.m
//  GoodLuck
//
//  Created by 郭为勇 on 2018/3/21.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "GYOrderList.h"

@implementation GYOrderList

+(NSMutableArray *)loadOrderList:(NSArray *)source {
    NSMutableArray *models = [NSMutableArray array];
    for (NSDictionary *dic in source) {
        GYOrderList *model = [[GYOrderList alloc] initWithDic:dic];
        [models addObject:model];
    }
    
    return models;
}

- (instancetype)initWithDic:(NSDictionary *)dic {
    if ([super init]) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return  self;
}

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"order_list"]) {
        self.order_list = [GYOrder loadOrderModel:value];
        
        return;
    }
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}
@end
